package com.dongchedi.mapper;

import com.dongchedi.entity.CustomerAddr;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author leibidong
 * @description 用户地址mapper对象
 * @date 2021/6/23
 */
@Mapper
@Component
public interface CustomerAddrMapper {
    public CustomerAddr queryById(Integer customerId);
    public Integer queryByAddressId(Integer customerId,Integer id);
    public List<CustomerAddr> queryAllById(Integer customerId);
    public  Integer addCustomerAddress(CustomerAddr customerAddr);
    public  Integer addDefaultCustomerAddress(CustomerAddr customerAddr);
    public  Integer updateCustomerAddress(CustomerAddr customerAddr);
    public CustomerAddr queryAddressIdAndCustomerId(Integer customerId,Integer id);
    public Integer deletebyId(Integer id,Integer customerId);
    public  Integer updateCustomerDefaultAddress(Integer customerId,Integer customerAddressId);
    public  Integer updateCustomerDefaultAddressZero(Integer customerId,Integer customerAddressId);
    public CustomerAddr queryCustomerAddressId(Integer customerId);
    public CustomerAddr selectAddressByAddressId(Integer id);
    public CustomerAddr selectPhoneByNameAddress(String customerName,String address);
 }
